/* -*- C++ -*- vim: set syntax=cpp: */
#ifndef __QUEX_INCLUDE_GUARD__ANALYZER__ASSERTS
#define __QUEX_INCLUDE_GUARD__ANALYZER__ASSERTS

#if ! defined(QUEX_OPTION_ASSERTS)
#   define __QUEX_ASSERT_COUNTER_CONSISTENCY(ME) /* empty */
#else
#   if defined(QUEX_OPTION_LINE_NUMBER_COUNTING) && defined(QUEX_OPTION_COLUMN_NUMBER_COUNTING)
#      define __QUEX_ASSERT_COUNTER_CONSISTENCY(ME)                                           \
       {                                                                                      \
          /* The line number can never decrease.                                           */ \
          __quex_assert((ME)->_line_number_at_begin <= (ME)->_line_number_at_end);            \
          /* If line number remained the same, then column number **must** have increased. */ \
          /* There is not pattern of a length less than 1                                  */ \
          if((ME)->_line_number_at_begin == (ME)->_line_number_at_end ) {                     \
              __quex_assert((ME)->_column_number_at_begin < (ME)->_column_number_at_end);     \
          }                                                                                   \
       } 
#   elif defined(QUEX_OPTION_LINE_NUMBER_COUNTING) && ! defined(QUEX_OPTION_COLUMN_NUMBER_COUNTING)
#      define __QUEX_ASSERT_COUNTER_CONSISTENCY(ME)                                           \
       {                                                                                      \
           __quex_assert((ME)->_line_number_at_begin   <= (ME)->_line_number_at_end);         \
       }  
#   else
       /* If only column numbers are counted, then no assumptions can be made about increase */ 
       /* or decrease. If a newline appearse, for example, the column number may decrease.   */
#      define __QUEX_ASSERT_COUNTER_CONSISTENCY(ME) /* empty */
#   endif

#   include <quex/code_base/buffer/Buffer>

QUEX_NAMESPACE_MAIN_OPEN

    QUEX_INLINE QUEX_TYPE_CHARACTER*  QUEX_NAME(access_Lexeme)(const char* FileName, size_t LineN, QUEX_NAME(Buffer)*);
    QUEX_INLINE size_t                QUEX_NAME(access_LexemeL)(const char* FileName, size_t LineN, QUEX_NAME(Buffer)*);
    QUEX_INLINE QUEX_TYPE_CHARACTER*  QUEX_NAME(access_LexemeEnd)(const char* FileName, size_t LineN, QUEX_NAME(Buffer)*);

QUEX_NAMESPACE_MAIN_CLOSE

#endif

#endif /* __INCLUDE_GUARD__QUEX_LEXER_CLASS_COUNT_LINE_COLUMN_COMMON */

